package com.sbtr.common.enums;

public enum CalculateFunTypeEnum {

    dauWaveTrans(CalculateFunDataTypeEnum.DOUBLE_ARRAY,CalculateFunDataTypeEnum.DOUBLE_ARRAY),

    ;


    String in;
    String out;
    CalculateFunTypeEnum(CalculateFunDataTypeEnum in, CalculateFunDataTypeEnum out){
        this.in=in.code;
        this.out=out.code;
    }

    public String getCodeByTitle(String title){
        CalculateFunTypeEnum[] calculateEnums = values();
        for (CalculateFunTypeEnum calculateEnum : calculateEnums) {
            if(calculateEnum.getOut().equals(title)){
                return calculateEnum.getIn();
            }

        }
        return null;
    }
    public String getTitleByCode(String code){
        CalculateFunTypeEnum[] calculateEnums = values();
        for (CalculateFunTypeEnum calculateEnum : calculateEnums) {
            if(calculateEnum.getIn().equals(code)){
                return calculateEnum.getOut();
            }
        }
        return null;
    }

    public String getIn() {
        return in;
    }

    public void setIn(String in) {
        this.in = in;
    }

    public String getOut() {
        return out;
    }

    public void setOut(String out) {
        this.out = out;
    }
}
